#include "tools.h"

char* convert_to_str(Token token) {
	switch (token.type) {
	case TOKEN_LEFT_PAREN: return "LEFT_PAREN";
	case TOKEN_RIGHT_PAREN: return "RIGHT_PAREN";
	case TOKEN_LEFT_BRACKET: return "LEFT_BRACKET";
	case TOKEN_RIGHT_BRACKET: return "RIGHT_BRACKET";
	case TOKEN_LEFT_BRACE: return "LEFT_BRACE";
	case TOKEN_RIGHT_BRACE: return "RIGHT_BRACE";
	case TOKEN_COMMA: return "COMMA";
	case TOKEN_DOT: return "DOT";
	case TOKEN_SEMICOLON: return "SEMICOLON";
	case TOKEN_TILDE: return "TILDE";
	case TOKEN_PLUS: return "PLUS";
	case TOKEN_PLUS_PLUS: return "PLUS_PLUS";
	case TOKEN_PLUS_EQUAL: return "PLUS_EQUAL";
	case TOKEN_MINUS: return "MINUS";
	case TOKEN_MINUS_MINUS: return "MINUS_MINUS";
	case TOKEN_MINUS_EQUAL: return "MINUS_EQUAL";
	case TOKEN_MINUS_GREATER: return "MINUS_GREATER";
	case TOKEN_STAR: return "STAR";
	case TOKEN_STAR_EQUAL: return "STAR_EQUAL";
	case TOKEN_SLASH: return "SLASH";
	case TOKEN_SLASH_EQUAL: return "SLASH_EQUAL";
	case TOKEN_PERCENT: return "PERCENT";
	case TOKEN_PERCENT_EQUAL: return "PERCENT_EQUAL";
	case TOKEN_AMPER: return "AMPER";
	case TOKEN_AMPER_EQUAL: return "AMPER_EQUAL";
	case TOKEN_AMPER_AMPER: return "AMPER_AMPER";
	case TOKEN_PIPE: return "PIPE";
	case TOKEN_PIPE_EQUAL: return "PIPE_EQUAL";
	case TOKEN_PIPE_PIPE: return "PIPE_PIPE";
	case TOKEN_HAT: return "HAT";
	case TOKEN_HAT_EQUAL: return "HAT_EQUAL";
	case TOKEN_EQUAL: return "EQUAL";
	case TOKEN_EQUAL_EQUAL: return "EQUAL_EQUAL";
	case TOKEN_BANG: return "BANG";
	case TOKEN_BANG_EQUAL: return "BANG_EQUAL";
	case TOKEN_LESS: return "LESS";
	case TOKEN_LESS_EQUAL: return "LESS_EQUAL";
	case TOKEN_LESS_LESS: return "LESS_LESS";
	case TOKEN_GREATER: return "GREATER";
	case TOKEN_GREATER_EQUAL: return "GREATER_EQUAL";
	case TOKEN_GREATER_GREATER: return "GREATER_GREATER";
	case TOKEN_IDENTIFIER: return "IDENTIFIER";
	case TOKEN_CHARACTER: return "CHARACTER";
	case TOKEN_STRING: return "STRING";
	case TOKEN_NUMBER: return "NUMBER";
	case TOKEN_SIGNED: return "SIGNED";
	case TOKEN_UNSIGNED: return "UNSIGNED";
	case TOKEN_CHAR: return "CHAR";
	case TOKEN_SHORT: return "SHORT";
	case TOKEN_INT: return "INT";
	case TOKEN_LONG: return "LONG";
	case TOKEN_FLOAT: return "FLOAT";
	case TOKEN_DOUBLE: return "DOUBLE";
	case TOKEN_STRUCT: return "STRUCT";
	case TOKEN_UNION: return "UNION";
	case TOKEN_ENUM: return "ENUM";
	case TOKEN_VOID: return "VOID";
	case TOKEN_IF: return "IF";
	case TOKEN_ELSE: return "ELSE";
	case TOKEN_SWITCH: return "SWITCH";
	case TOKEN_CASE: return "CASE";
	case TOKEN_DEFAULT: return "DEFAULT";
	case TOKEN_WHILE: return "WHILE";
	case TOKEN_DO: return "DO";
	case TOKEN_FOR: return "FOR";
	case TOKEN_BREAK: return "BREAK";
	case TOKEN_CONTINUE: return "CONTINUE";
	case TOKEN_RETURN: return "RETURN";
	case TOKEN_GOTO: return "GOTO";
	case TOKEN_CONST: return "CONST";
	case TOKEN_SIZEOF: return "SIZEOF";
	case TOKEN_TYPEDEF: return "TYPEDEF";
	case TOKEN_ERROR: return "ERROR";
	case TOKEN_EOF: return "EOF";
	default: return "UNKNOWN";
	}
}